function sum_rate_terres = cal_sum_rate_terres(N,K,ww,hGG,noise)
[uu,~]=update_u_v(N,K,ww,hGG,noise);
sum_rate_terres=0;
for nn=1:N
    for kk=1:K
        sum_rate_terres = sum_rate_terres + log2(1+uu(nn,kk));
    end
end
end

% function sum_rate_terres = cal_sum_rate_terres(N,K,uu)
% sum_rate_terres=0;
% for nn=1:N
%     for kk=1:K
%         sum_rate_terres = sum_rate_terres + log2(1+uu(nn,kk));
%     end
% end
% end